package com.ltmonitor.jt808.protocol;

public class PostitionAdditional_Voltage implements IPositionAdditionalItem {

	public final int getAdditionalId() {
		return 0xE1;
	}

	public final byte getAdditionalLength() {
		return 0x02;
	}

	/**
	 * 电压,单位0.01V
	 */

	private short privateVoltage;

	public final short getVoltage() {
		return privateVoltage;
	}

	public final void setVoltage(short value) {
		privateVoltage = value;
	}

	public final byte[] WriteToBytes() {
		return BitConverter.GetBytes(getVoltage());
	}

	public final void ReadFromBytes(byte[] bytes) {
		setVoltage((short) BitConverter.ToUInt16(bytes, 0));
	}
}